package com.metaera.app.utils.image;

import android.text.TextUtils;

import com.bumptech.glide.Glide;
import com.bumptech.glide.ListPreloader;
import com.bumptech.glide.RequestBuilder;

import java.util.Collections;
import java.util.List;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

public class ItemPreloadModelProvider<U> implements ListPreloader.PreloadModelProvider<U> {
//    @Override
//    @NonNull
//    List<U> getPreloadItems(int position) {
//        String url = myUrls.get(position);
//        if (TextUtils.isEmpty(url)) {
//            return Collections.emptyList();
//        }
//        return Collections.singletonList(url);
//    }

    @Nullable
    @Override
    public RequestBuilder<?> getPreloadRequestBuilder(@NonNull Object item) {
        return null;
    }

    @NonNull
    @Override
    public List<U> getPreloadItems(int position) {
        return null;
    }

//    @Override
//    @Nullable
//    RequestBuilder getPreloadRequestBuilder(String url) {
//        return
//                Glide.with(fragment)
//                        .load(url)
//                        .override(imageWidthPixels, imageHeightPixels);
//    }

}
